<template>
  <div class="size-form-wrapper">
    <el-form :model="sizeForm" label-width="80px">
      <el-form-item label="组件宽度">
        <el-input v-model="sizeForm.width" placeholder="请输入组件宽度" />
      </el-form-item>
      <el-form-item label="组件高度">
        <el-input v-model="sizeForm.height" placeholder="请输入组件高度" />
      </el-form-item>
    </el-form>
  </div>
</template>

<script lang="ts">
import { defineComponent, computed } from "vue";
import { sizeType } from "@/types/form/index";
export default defineComponent({
  name: "SizeForm", // width, height表单组件
  props: {
    property: {
      default: (): sizeType => ({
        width: 100,
        height: 100,
      }),
    },
    componentName: {
      type: String,
      default: "layout",
      require: true,
    },
  },
  setup(props) {
    const sizeForm = computed(() => {
      return props.property;
    });
    return {
      sizeForm,
    };
  },
});
</script>

<style lang="scss" scoped></style>
